package com.bajiao.entity.account;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 用户账户流水
 * @Author: FanJq
 * @Date:   2024-08-31
 * @Version: V1.0
 */
@Data
@TableName("user_account_bill")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="user_account_bill对象", description="用户账户流水")
public class AccountBill {

	/**主键id*/
	@TableId(type = IdType.ID_WORKER_STR)
    @ApiModelProperty(value = "主键id")
	private String id;
	/**用户id*/
    @ApiModelProperty(value = "用户id")
	private String userId;
	/**变动前金额*/
	@Excel(name = "变动前金额", width = 15, orderNum = "20")
    @ApiModelProperty(value = "变动前金额")
	private BigDecimal beforeMoney;
	/**变动金额*/
	@Excel(name = "变动金额", width = 15, orderNum = "30")
    @ApiModelProperty(value = "变动金额")
	private BigDecimal changeMoney;
	/**变动后金额*/
	@Excel(name = "变动后金额", width = 15, orderNum = "40")
    @ApiModelProperty(value = "变动后金额")
	private BigDecimal afterMoney;
	/**标志符 + -*/
    @ApiModelProperty(value = "标志符 + -")
	private String sign;
	/**1:收入 2:支出*/
    @ApiModelProperty(value = "1:收入 2:支出")
	private Integer billType;
	/**1:充值 2:提现 3:提现失败*/
    @ApiModelProperty(value = "1:充值 2:购买优惠券 3:购买商品 4:优惠券退款 5:商品退款 6:注册赠送 7:邀请奖励 99:平台赠送")
	private int type;
	/**订单编号*/
    @ApiModelProperty(value = "订单编号")
	private String orderNo;
	/**账单标题*/
	@Excel(name = "账单标题", width = 30, orderNum = "70")
    @ApiModelProperty(value = "账单标题")
	private String title;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss", orderNum = "80")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	private Date createTime;
	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private Date updateTime;
}
